Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Defining triggers
Skip down to the part of the code marked Control Triggers. Here you’ll find the trigger blocks you defined for the buttons. Before these button triggers, there are a couple of standard AppBuilder-generated triggers to capture window events. Take a look at the second window trigger block:
Note: The
:Utag that follows the quoted string tells the compiler to leave this string out of its list of strings that might be sensible to translate into other human languages. Since the wordCLOSEis just part of the program logic and not something a user would ever see or want to see in a different language, it should never be translated.
WINDOW-CLOSEis one of those events like theCHOOSEevent for a button. Remember that each type of object has its own set of events it can capture.WINDOW-CLOSE, logically enough, is the event that a window receives when it is closed, for example, by clicking the standard close-window box in the corner of the window.The code then cascades this event down to the running procedure itself, by applying the
CLOSEevent to the procedure. There’s a special built-in function that always holds the handle of the currently running procedure:THIS-PROCEDURE. TheAPPLYstatement makes an event happen just as a user action would. The event in this case is theCLOSEevent for the procedure. Keep this in your mind for a few moments, and you’ll soon see what theCLOSEevent does.The
RETURN NO-APPLYstatement just means: “Skip whatever action was in the queue of user interface actions, because we’re getting out anyway.”The button triggers
Next come the four button triggers you defined yourself. Just look at the first of them to confirm the syntax of the
ONstatement:
When you define triggers in the Section Editor, it masks the syntax of the
ONstatement somewhat by putting the event name and the object name into fill-ins that you can select. It also automatically adds theIN FRAMEqualifier for you, based on which frame contains the object.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |